Add Databricks provider (AI Gateway / Foundation Model APIs)#1433
Add Databricks provider (AI Gateway / Foundation Model APIs)#1433prasadkona wants to merge 2 commits intoanomalyco:devfrom
Conversation
c791a73 to
57fd9ae
Compare
Catalog providers/databricks for Foundation Model APIs on AI Gateway: default mlflow/v1 via @databricks/ai-sdk-provider; per-model overrides for Anthropic Messages, Gemini generateContent, and Openai Responses (codex). Schema allows @databricks/ai-sdk-provider where api is required. Adds discovery and HTTP E2E scripts, README, and root README pointer.
57fd9ae to
1f7590b
Compare
- Correct attachment flags: gpt-oss-120b, gpt-oss-20b, qwen3-next-80b set to false (gateway returns "Image input is not supported for this endpoint") - Add pdf to modalities.input for all Gemini models and Codex models (confirmed via inlineData / Responses API input_file probes) - Set temperature=false for all gpt-5* models (policy rule): base variants return HTTP 400 "Only the default (1) value is supported"; all gpt-5* unified to false for catalog consistency - Fix gpt-5-nano tool_call: true (false negative - now uses tool_choice:"required") - Add reasoning=true for gpt-5-nano (reasoning_tokens confirmed in usage) - Add reasoning=true for gemma-3-12b (<think> blocks confirmed via system prompt) - Add probe script: packages/core/script/probe-databricks-capabilities.ts Tests tool-use, reasoning, image, PDF, and temperature across all 4 API surfaces (mlflow/v1 chat, Anthropic, Gemini, OpenAI Responses). Read-only diagnostic tool.
| }, | ||
| "packages": { | ||
| "@cloudflare/workers-types": ["@cloudflare/[email protected]", "", {}, "sha512-BQmMdoOGClY23TesgkR1PeGrPvPsSFD/zW7pDzWZHkOEsqkPk2A91h52bP8GbtKYTl1vdaYjQgJlGsP6Ih4G0w=="], | ||
| "@cloudflare/workers-types": ["@cloudflare/[email protected]", "https://npm-proxy.dev.databricks.com/@cloudflare/workers-types/-/workers-types-4.20250801.0.tgz", {}, "sha512-BQmMdoOGClY23TesgkR1PeGrPvPsSFD/zW7pDzWZHkOEsqkPk2A91h52bP8GbtKYTl1vdaYjQgJlGsP6Ih4G0w=="], |
There was a problem hiding this comment.
i'm not sure how this bun.lock file is used in this repo, but you'll prob need to use a personal laptop or something not on db's internal proxy to generate this file
| "$schema": "https://json.schemastore.org/package.json", | ||
| "type": "module", | ||
| "dependencies": { | ||
| "@databricks/sdk-experimental": "^0.16.0", |
There was a problem hiding this comment.
i'm unsure how packages/core is used, but we prob wouldn't want to add databricks as a dependency for the core package right? wouldn't this be installed for all customers? this additional dependency probably belongs in a provider-specific folder
There was a problem hiding this comment.
I think we're currently adding functionality in the wrong places -- granted I'm not very familiar with this codebase, but I don't think that we should be adding scripts / dependencies to the core package (and instead just be adding them to our databricks subfolder)
Summary
Adds a Databricks catalog under
providers/databricks/for Foundation Model APIs exposed through Databricks AI Gateway: OpenAI-compatible chat/embeddings onmlflow/v1, plus per-model overrides for Anthropic Messages, GeminigenerateContent, and OpenAI Responses—all on the sameai_gateway_urlhost returned by workspace discovery.What’s included
providers/databricks/—provider.toml,logo.svg, per-modelmodels/*.toml(capabilities, limits, costs where applicable,[provider]overrides for non-MLflow surfaces).providers/databricks/README.md— Scope, discovery (GET /api/ai-gateway/v2/endpoints), HTTP layout, auth, eligibility rules, maintainer scripts.README.md— One-line pointer to the Databricks provider doc.package.json):bun run databricks:list-gateway— list/filter gateway routes (discovery helper).bun run databricks:test-inference— E2E against live gateway (packages/core/script/test-databricks.ts).packages/core/script/databricks-ai-gateway-shared.ts— Shared discovery + URL helpers for list/test scripts.packages/core/package.json—@databricks/sdk-experimentalfor discovery/auth in scripts.Validation / how reviewers can check
Optional (requires Databricks auth + workspace with AI Gateway routes):
Testing
bun validatepasses locallydatabricks:test-inferenceexercised against a workspace profile (36/36 gateway routes) where applicableNotes